x86: force EFLAGS.IF on when exiting to PV guests
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 16:40:37 +0000 (17:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 16:40:37 +0000 (17:40 +0100)
commit7628c7efb4afca8cb2264bc3ab59830e481b37a8
treea9f6a592fac43de40942cb6fea5bbc488b1410f4
parentb996efb23864f7135db3578a3a2059fe2f3c1a98
x86: force EFLAGS.IF on when exiting to PV guests

Guest kernels modifying instructions in the process of being emulated
for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
next exiting to guest context, by converting the being emulated
instruction to CLI (at the right point in time). Prevent any such bad
effects by always forcing EFLAGS.IF on. And to cover hypothetical other
similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.

This is CVE-2016-10024 / XSA-202.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 0e47f92b072548800223f9a21ea051a017173915
master date: 2016-12-21 16:46:13 +0100
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S